home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
hc
/
summariz.sit
/
Summarizer 1.7
/
background_8347.txt
< prev
next >
Wrap
Text File
|
1988-03-18
|
14KB
|
525 lines
-- background: 8347 from stack: in.7
-- bmap block id: 9173
-- flags: 0000
-- background id: 0
-- name: BlankChaptBkgnd
-- part 1 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=21 top=288 right=315 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Quit
----- HyperTalk script -----
on mouseUp
if short name of this card is "TpcLstTmplt" then exit mouseup
answer "Perhaps you accidently pressed Quit?" with "Yes I did" or "No I didn't"
if it is "No I didn't" then domenu "Quit Hypercard"
end mouseUp
-- part 4 (field)
-- low flags: 01
-- high flags: 2007
-- rect: left=254 top=0 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: TpcLstFld
----- HyperTalk script -----
on mouseup
global chapt,UserChoice,NtHeader
Put the number of words in field "TpcLstFld" into NumWords
if NumWords is 0 then exit mouseup
set locktext of field "TpcLstFld" to false
put item 2 of the clickloc into Ln
put item 1 of the rect of field "TpcLstFld" into Left
add 6 to Left
put item 3 of the rect of field "TpcLstfld" into Right
subtract 19 from Right
click at Right,Ln
click at Left,Ln with shiftkey
if the selection is empty then
beep 2
click at 0,0
set locktext of field "TpcLstFld" to true
put number of lines in field "TpcLstFld" into LastLn
repeat with x = 1 to LastLn
if line x of field "TpcLstFld" is empty then
delete line x to lastLn of field "TpcLstFld"
exit repeat
end if
end repeat
exit mouseup
end if
set locktext of field "TpcLstFld" to true
put the selection into NtHeader
repeat with x = 1 to NumWords
if the selection is line x of field "TpcLstFld" then exit repeat
end repeat
put line x of field "TpcOrdrFld" into TopicNum
put Chapt & TopicNum into UserChoice
visual effect zoom open slowly
go to card UserChoice
if the result is not empty then NoNtCrd
if the number of card fields is 1
then put IBeam("TxtFld") into dummy
end mouseup
-- part 5 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=93 top=288 right=315 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Chapter List
----- HyperTalk script -----
on mouseUp
if short name of this card is "TpcLstTmplt" then exit mouseup
go to card "ChptLstCrd"
end mouseUp
-- part 16 (field)
-- low flags: 81
-- high flags: 0007
-- rect: left=86 top=103 right=215 bottom=150
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: TpcOrdrFld
-- part 21 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=21 top=256 right=283 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Add Topics
----- HyperTalk script -----
on mouseup
if short name of this card is "TpcLstTmplt" then exit mouseup
put short name of this card into Chapt
put the number of chars in Chapt into NumChars
put 0 into ChaptNum
repeat with x = NumChars down to 1
get 26 ^ (x - 1) * ((CharToNum of char x of Chapt) - 65)
add It to ChaptNum
end repeat
repeat while true
put the number of lines in field "TpcLstFld" + 1 into TopicNum
put "Name Topic" && TopicNum && "of Chapt" && ChaptNum into Prompt
ask prompt
if it is empty then
exit mouseup
end if
put it into UsrTpcNam
put UsrTpcNam & return after field "TpcLstFld"
put TopicNum & return after field "TpcOrdrFld"
set cursor to 4
set lockscreen to true
put MakeCard("NtTmplt") into dummy
put Chapt & TopicNum into NtCrdNam
set the name of this card to NtCrdNam
put UsrTpcNam into field "HeaderFld"
go to card Chapt
set lockscreen to false
flash 2
end repeat
end mouseup
-- part 22 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=93 top=256 right=283 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rename
----- HyperTalk script -----
on mouseUp
if short name of this card is "TpcLstTmplt" then exit mouseup
Put the number of words in field "TpcLstFld" into NumWords
if NumWords is 0 then
beep 1
exit mouseup
end if
ask "Rename what Topic?"
if it is empty then exit mouseup
put hilite of bkgnd button "ExactMtch" into ExactMatch
set cursor to 4
repeat with LnNum = 1 to NumWords
if Exactmatch then
if It is line LnNum of field "TpcLstFld" then
exit repeat
end if
else
if It is in line LnNum of field "TpcLstFld" then
exit repeat
end if
end if
if LnNum is NumWords then
beep 1
put "The name you entered is not in the list!"
wait 2 seconds
hide msg
exit mouseup
end if
end repeat
set cursor to 1
put "Enter New Title for Topic" into prompt
ask prompt
if it is empty then exit mouseup
put it into NewTitle
put it into Hdr
put line LnNum of field "TpcLstFld" into Temp
put the number of chars in Temp into EndChar
repeat with NonSpc = 1 to EndChar
if char NonSpc of Temp is not " " then exit repeat
end repeat
put NewTitle into char NonSpc to EndChar of line LnNum of field "TpcLstFld"
set cursor to 4
set lockscreen to true
put short name of this card into LetterName
put line LnNum of field "TpcOrdrFld" into TpcOrdrNum
put LetterName & TpcOrdrNum into RenamedCrd
go to card RenamedCrd
put Hdr into field "HeaderFld"
repeat while true
go to next card
if short name of this card is "@" then
put "…" && Hdr && "cont." into field "HeaderFld"
else
exit repeat
end if
end repeat
go to card LetterName
set lockscreen to false
flash 2
end mouseUp
-- part 23 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=165 top=256 right=283 bottom=232
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Delete
----- HyperTalk script -----
on mouseUp
put number of lines in field "TpcLstFld" into LstTNum
if LstTNum < 2 then
beep 1
put "Can't delete last topic!"
exit mouseup
end if
ask "Delete which topic?"
if it is empty then exit mouseup
put it into DelChoice
put hilite of bkgnd button "ExactMtch" into ExactMatch
set cursor to 4
repeat with UDelNum = 1 to LstTNum
if Exactmatch then
if DelChoice is line UDelNum of field "TpcLstFld" then
exit repeat
end if
else
if DelChoice is in line UDelNum of field "TpcLstFld" then
exit repeat
end if
end if
if UDelNum is LstTNum then
beep 1
put "The name you entered is not in the list!"
wait 2 seconds
hide msg
exit mouseup
end if
end repeat
put line UDelNum of field "TpcOrdrFld" into ADelNum
put short name of this card into ChptNam
if ADelNum is LstTNum then
delete line UDelNum of field "TpcOrdrFld"
delete line UDelNum of field "TpcLstFld"
set cursor to 4
set lockscreen to true
go to card ChptNam & ADelNum
domenu "delete card"
repeat while short name of this card is "@"
domenu "delete card"
end repeat
else
repeat with x = 1 to LstTNum
if line x of field "TpcOrdrFld" is LstTNum then exit repeat
end repeat
put ADelNum into line x of field "TpcOrdrFld"
delete line UDelNum of field "TpcLstFld"
delete line UDelNum of field "TpcOrdrFld"
set cursor to 4
set lockscreen to true
go to card ChptNam & ADelNum
domenu "delete card"
repeat while short name of this card is "@"
domenu "delete card"
end repeat
go to card ChptNam & LstTNum
set name of this card to ChptNam & ADelNum
end if
go to card ChptNam
set lockscreen to false
flash 2
end mouseUp
-- part 24 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=165 top=288 right=315 bottom=232
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Insert
----- HyperTalk script -----
on mouseup
if short name of this card is "TpcLstTmplt" then exit mouseup
put number of lines in field "TpcLstFld" into TtlNumTpcs
if TtlNumTpcs is 0 then exit mouseup
put short name of this card into Chapt
put "Name for inserted Topic?" into prompt
ask prompt
if it is empty then exit mouseup
put it into InsertedName
put "Insert after what topic? [none]" into prompt
ask prompt
if it is empty then exit mouseup
put it into AfterName
put hilite of bkgnd button "ExactMtch" into ExactMatch
set cursor to 4
if AfterName is "none" then
put 1 into UsrTpcNum
else
repeat with x = 1 to TtlNumTpcs
if Exactmatch then
if AfterName is line x of field "TpcLstFld" then
exit repeat
end if
else
if AfterName is in line x of field "TpcLstFld" then
exit repeat
end if
end if
if x is TtlNumTpcs then
beep 1
put "The name you entered is not in the list!"
wait 2 seconds
hide msg
exit mouseup
end if
end repeat
put x + 1 into UsrTpcNum
end if
put InsertedName & return before line UsrTpcNum of field "TpcLstFld"
set lockscreen to true
put TtlNumTpcs + 1 into LstTpcNum
put LstTpcNum & return before line UsrTpcNum of field "TpcOrdrFld"
put MakeCard("NtTmplt") into dummy
put Chapt & LstTpcNum into NtCrdNam
set the name of this card to NtCrdNam
put InsertedName into field "HeaderFld"
go to card Chapt
set lockscreen to false
flash 2
end mouseup
-- part 25 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=140 top=225 right=241 bottom=156
-- title width / last selected line: 0
-- icon id / first selected line: 16692 / 16692
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: IncIndent
----- HyperTalk script -----
on mouseUp
if field "IndentFld" is not 12
then add 3 to field "IndentFld"
end mouseUp
-- part 26 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=98 top=224 right=240 bottom=114
-- title width / last selected line: 0
-- icon id / first selected line: 3584 / 3584
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DecIndent
----- HyperTalk script -----
on mouseUp
if field "IndentFld" is not 0
then subtract 3 from field "IndentFld"
end mouseUp
-- part 27 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=114 top=226 right=239 bottom=138
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: IndentFld
-- part 28 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=165 top=224 right=251 bottom=232
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: IndentTpcLst
----- HyperTalk script -----
on mouseUp
global NumTpc,XactMtch,Xit
Put number of lines in bkgnd field "TpcLstFld" into NumTpc
if NumTpc is 0 then exit mouseup
put hilite of bkgnd button "ExactMtch" into XactMtch
ask "Name first Topic to be indented"
if it is empty then exit mouseup
put it into fTpc
put GetTpcNum(fTpc,"TpcLstFld") into fLnNum
if Xit then exit mouseup
ask "Name last Topic to be indented"
if it is empty then exit mouseup
put it into lTpc
put GetTpcNum(lTpc,"TpcLstFld") into lLnNum
if Xit then exit mouseup
put bkgnd field "IndentFld" into NumIndent
put empty into Spcs
repeat for NumIndent times
put " " before Spcs
end repeat
repeat with x = fLnNum to lLnNum
put line x of bkgnd field "TpcLstFld" into Temp
repeat while char 1 of Temp is " "
delete char 1 of Temp
end repeat
put Spcs before Temp
put Temp into line x of bkgnd field "TpcLstFld"
end repeat
end mouseUp
-- part 30 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=22 top=237 right=250 bottom=53
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ExactMtch
----- HyperTalk script -----
on mouseUp
set hilite of bkgnd button "ExactMtch" to true
set hilite of bkgnd button "PartialMtch" to false
end mouseUp
-- part 31 (button)
-- low flags: 00
-- high flags: 4000
-- rect: left=53 top=237 right=250 bottom=87
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: PartialMtch
----- HyperTalk script -----
on mouseUp
set hilite of bkgnd button "ExactMtch" to false
set hilite of bkgnd button "PartialMtch" to true
end mouseUp